package ooday03;

public class InterfaceDemo{
    public static void main(String[] args) {
        Dog dog = new Dog("花花",3,"白");
        dog.swim();
    }
}

abstract class Aoo{
    abstract void eat();

}
interface Inter{
    int setAge();
    void play();
}

interface Inter2{
    void run();
}

/**
 * 继承在前，实现在后
 * 接口的实现类必须重写接口中的所有抽象方法，且加public
 */
 class InterImpl extends Aoo implements Inter,Inter2{

    void eat(){

    }
    public int setAge(){
        return 0;
    }

    public void play(){

    }
    public void run(){

    }
 }

/**
 * 接口可以继承(多个)接口
 */
interface Inter3 extends Inter,Inter2{
    void say();
}

